<tagLib name="html" />
{$header}
<div id="main" class="main" >
<!-- 主体内容  -->
<div class="content" >
  
<!--  功能组区域  -->
<div class="btn-toolbar">
      <div class="btn-group">
        <a href="__URL__/index" class="btn"><i class="icon-th-list"> </i>全部订单</a>
    <?php $ods = C('payStatus'); ?>
    <foreach name="ods" item="vo">
        <a href="__URL__/index/pay_status/{$key}" class="btn"><i class="icon-th-list"> </i>{$vo}</a>
    
    </foreach>
    </div>
    <form class="search-form " method='get' action="__URL__">
      <select name="time_type" class="span1"> 
      <option value="1" <eq name="_REQUEST.time_type" value="1">selected</eq> >预付款时间</option> 
      <option value="2" <eq name="_REQUEST.time_type" value="2">selected</eq> >余款时间</option> 
      <option value="3" <eq name="_REQUEST.time_type" value="3">selected</eq> >退款时间</option>
      <option value="4" <eq name="_REQUEST.time_type" value="4">selected</eq> >交货期</option> 
      <option value="5" <eq name="_REQUEST.time_type" value="5">selected</eq> >创建时间</option>  
    </select>
    从<input type="text" class="span2"  name="start_time" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="<notempty name='_REQUEST.start_time'>{$_REQUEST.start_time}</notempty>">
    到<input type="text" class="span2" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="end_time" id="end_time" value="<notempty name='_REQUEST.end_time'>{$_REQUEST.end_time}</notempty>" >

      采购{:configList( C('buyStatus'),$_REQUEST['status'],'status','span1' )}
      小单{:configList( C('orderDetailStatus'),$_REQUEST['dstatus'],'dstatus' ,'span1')}
    付款{:configList( C('payStatus'),$_REQUEST['pay_status'],'pay_status' ,'span1')}
    <input type="text" class="search-query span2" name="sale_key" <notempty name='_REQUEST.sale_key'>
                    <php>echo 'value="'.urldecode($_REQUEST['sale_key']).'"'</php><else/>
                    placeholder="销售订单号,PO"
                </notempty>
                >
              <input type="text" class="search-query span4" name="keywords" <notempty name='_REQUEST.keywords'>
                    <php>echo 'value="'.urldecode($_REQUEST['keywords']).'"'</php><else/>
                    placeholder="采购订单号,产品或供应商"
                </notempty>
                >
                <input type="submit" class="btn btn-primary" value="搜索">
          </form>
          
  </div>
<!-- 功能组区域结束 -->
<php>
    function getMano($oid){
      return getModelName($oid,'Order_detail','mano');
  }
</php>
<!-- 列表显示区域  -->
<div class="list" >
<div id="result" class="result none"></div><html:list id="checkList" style="table table-bordered table-striped" name="action" checkbox="true" action="true" datasource="list" show="id:编号|5%:edit,mano:采购单号:edit,order_detail_id|getMano:销售订单分号,order_detail_id|getMsgTip:备注,product_id|getPfullName:产品,product_id|getCas:CAS,supplier_id|getModelName=Supplier:供应商,number:数量,price:单价,total:总价,pay_status|getConfigVal=paystatus:付款状态,first_pay:已支付预付款,remain_pay:已支付余款,real_pay:实际付款,user_id|getModelName=User:经办人,ask_charge_man|getModelName=User:询价负责人,create_time|toDate:采购时间,sample_qc_status|getConfigVal=sampleqcstatus:货前样质量管理,in_qc_status|getConfigVal=inqcstatus:入库质量管理,status|getConfigVal=buyStatus:状态,first_pay_time|toDate:预付款时间,remain_pay_time|toDate:余款时间,back_money_time|toDate:退款时间" actionlist="edit:详情:id,check:复核:id" />
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<!-- 主页面结束 --><include file="Public:footer"/>
<script type="text/javascript">
  function fastadd(){
    location.href=URL+"/fastadd";
  }
  function check(id){
    location.href=URL+"/check/id/"+id;
  }

  function quicksale(id){
    var keyValue;
    if (id)
    {
      keyValue = id;
    }else {
      keyValue = getSelectCheckboxValues();
    }
    if (!keyValue)
    {
      alert('请选择入库单！');
      return false;
    }
    location.href=APP+"/Sale/fastadd/enter_id/"+keyValue;
  }
</script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
